<?php
class GlobalVo extends SzAbstractMySqlVo
{

    private $key;
    private $value;

    /**
     * Initialize GlobalVo.
     *
     * @param $key
     * @param $value
     * @param boolean $isInsert default false, means for now this vo is initialized not for insert process
     * @return GlobalVo
     */
    public function __construct($key, $value, $isInsert = false) {
        $this->key = $key;
        $this->value = $value;

        $this->isInsert = $isInsert;
        $this->voClassName = 'GlobalVo';
        $this->ormName = 'Global';
    }

    /**
     * @see SzAbstractVo::toArray
     */
    public function toArray($needEncode = false)
    {
        return array(
            'key' => $this->getKey(),
            'value' => $this->getValue(),
        );
    }

    /**
     * @see SzAbstractVo::toEntireArray
     */
    public function toEntireArray($needEncode = false)
    {
        return array(
            'key' => $this->getKey(),
            'value' => $this->getValue(),
        );
    }

    /**
     * @see SzAbstractVo::toPureArray
     */
    public function toPureArray()
    {
        return array(
            $this->getKey(),
            $this->getValue(),
        );
    }

    public function getKey()
    {
        return $this->key;
    }

    public function setKey($val)
    {
        $this->saveColumnStatus(0, $this->key);
        $this->key = $val;
    }

    public function getValue()
    {
        return $this->value;
    }

    public function setValue($val)
    {
        $this->saveColumnStatus(1, $this->value);
        $this->value = $val;
    }

}